home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / misc / gs261src.zip / make.doc < prev    next >
Text File  |  1993-05-29  |  27KB  |  625 lines

  1.    Copyright (C) 1989, 1990, 1991, 1993 Aladdin Enterprises.  All rights reserved.
  2.  
  3. This file is part of Ghostscript.
  4.  
  5. Ghostscript is distributed in the hope that it will be useful, but
  6. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  7. to anyone for the consequences of using it or for whether it serves any
  8. particular purpose or works at all, unless he says so in writing.  Refer
  9. to the Ghostscript General Public License for full details.
  10.  
  11. Everyone is granted permission to copy, modify and redistribute
  12. Ghostscript, but only under the conditions described in the Ghostscript
  13. General Public License.  A copy of this license is supposed to have been
  14. given to you along with Ghostscript so you can know your rights and
  15. responsibilities.  It should be in a file named COPYING.  Among other
  16. things, the copyright notice and this notice must be preserved on all
  17. copies.
  18.  
  19. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  20.  
  21. This file, make.doc, describes how to install Ghostscript, and how to
  22. build Ghostscript executables from source.
  23.  
  24. For an overview of Ghostscript and a list of the documentation files, see
  25. README.
  26.  
  27. ********
  28. ******** Installing Ghostscript
  29. ********
  30.  
  31. To install the interpreter, you need:
  32.     - The interpreter executable:
  33.         - On MS-DOS and VMS systems, gs.exe.
  34.         - On MS-DOS systems, if you are using the Watcom compiler,
  35.           the DOS extender, dos4gw.exe.
  36.         - On Unix systems, gs.
  37.     - The interpreter initialization files:    gs_*.ps.
  38.     - The font map: Fontmap.
  39.     - The default font: uglyr.gsf.
  40.  
  41. See use.doc for a description of the search algorithm used to find these
  42. files.
  43.  
  44. You do not need any of these files when using the library; however, the
  45. library currently provides no way to install fonts.  This is obviously
  46. ridiculous and will be fixed sometime in the future.
  47.  
  48. ********
  49. ******** Building Ghostscript from source
  50. ********
  51.  
  52. Ghostscript is generally distributed in the form of a compressed tar file.
  53. When unpacked, this file puts all the Ghostscript files in a directory
  54. called gs.  Ghostscript is also available in the form of PC-compatible ZIP
  55. files.
  56.  
  57. Ghostscript is described by a collection of several makefiles:
  58.  
  59.     gs.mak - a generic makefile used on all platforms (except VMS).
  60.     devs.mak - a makefile listing all the device drivers.
  61.     *.mak - the makefiles for specific platforms.
  62.  
  63. You may need to edit the platform-specific makefile if you wish to change
  64. any of the following options:
  65.  
  66.     - The default search path(s) for the initialization and font files
  67. (macro GS_LIB_DEFAULT);
  68.  
  69.     - The debugging options (macro TDEBUG);
  70.  
  71.     - The set of device drivers to be included (DEVICE_DEVS
  72.     and DEVICE_DEVS1..9 macros);
  73.  
  74.     - The set of optional features to be included (FEATURE_DEVS macro).
  75.  
  76. The platform-specific makefile will include comments describing all of
  77. these items except the DEVICE_DEVS options.  The DEVICE_DEVS options are
  78. described in devs.mak, even though the file that must be edited is the
  79. platform-specific makefile.
  80.  
  81. The makefiles distributed with Ghostscript define these options as
  82. follows:
  83.  
  84.     - GS_LIB_DEFAULT: on Unix systems, /usr/local/lib/ghostscript
  85. and /usr/local/lib/ghostscript/fonts; on MS-DOS systems, C:\GS.
  86.  
  87.     - TDEBUG: no debugging code included in the build.
  88.  
  89.     - DEVICE_DEVS*: platform-specific, see below.
  90.  
  91.     - FEATURE_DEVS: platform-specific.
  92.  
  93. There are also platform-specific options described below under the
  94. individual platforms.  See the "Options" section near the beginning of the
  95. relevant makefile for more information.
  96.  
  97. If you are including a dot-matrix printer driver, you may wish to
  98. customize the default resolution parameters in devs.mak.
  99.  
  100. To build the interpreter, you need all the .h and .c files (and .asm files
  101. for MS-DOS) included in the distribution, as well as the makefiles.
  102.  
  103. The command
  104.     make clean
  105. removes all the files created by the build process (relocatables,
  106. executables, and miscellaneous scratch files).  If you want to save the
  107. executable, you should move it to another directory first.
  108.  
  109. ********
  110. ******** How to build Ghostscript from source (MS-DOS version) ********
  111. ********
  112.  
  113. To find out what devices the makefiles distributed with Ghostscript
  114. select for inclusion in the executable, find the lines in the
  115. appropriate makefiles of the form
  116.     FEATURE_DEVS=<list of features>
  117. and
  118.     DEVICE_DEVS=<list of devices>
  119.     (similarly DEVICE_DEVS1... up to DEVICE_DEVS9)
  120. The relevant makefiles are:
  121.     Turbo C: tc.mak
  122.     Turbo C++/Borland C++, MS-DOS: bc.mak
  123.     Borland C++, MS Windows: bcwin.mak
  124.     Microsoft C/C++ 7.0, MS-DOS: msc.mak
  125.     Watcom C/386, MS-DOS: watc.mak
  126. The options were chosen to strike a balance between RAM consumption
  127. and likely usefulness.  (Turbo C is limited to 640K and does not
  128. support code overlaying; Borland C++ is limited to 640K, but supports
  129. code overlaying under MS-DOS; Watcom C/386 is not limited to 640K.)
  130.  
  131. To build Ghostscript, you need MS-DOS version 3.3 or later, and a
  132. (Borland) Turbo C/C++, Borland C/C++, Microsoft C/C++ (version 7), or
  133. Watcom C/386 development system.  Details are given below.
  134.  
  135. As noted above, the default configuration generates an executable that
  136. assumes the directory where 'make' was run should be the final default
  137. directory for looking up the Ghostscript initialization and font files.
  138.  
  139. To build the Ghostscript executable, all you need to do is give the
  140. command
  141.     make
  142. You must have COMMAND.COM in your path to build Ghostscript.
  143.  
  144. There is a special 'make' target that simply attempts to compile all the
  145. .c files in the current directory.  Some of these compilations will fail,
  146. but the ones that succeed will go considerably faster, because they don't
  147. individually pay the overhead of loading the compiler into memory.  So a
  148. good strategy for building the executable for the first time, or after a
  149. change to a very widely used .h file, is:
  150.     make begin
  151. and then
  152.     make
  153. to do the compilations that failed the first time.
  154.  
  155. Note: if you get the Ghostscript sources from a Unix 'tar' file and unpack
  156. the file on a MS-DOS machine, the files will all have linefeed instead of
  157. carriage return + linefeed as the line terminator, which may make the C
  158. compiler unhappy.  I don't know the simplest way to fix this: just reading
  159. each file into an editor and writing it back out again may be sufficient.
  160. You will probably have to do this to the .c, .h, and .bat files.
  161.  
  162. Borland environment
  163. -------------------
  164.  
  165. To compile Ghostscript with the Borland environment, you need either Turbo
  166. C (version 2.0 or later) or Turbo C++ or Borland C++ (version 1.0 or
  167. later); specifically, the compiler, 'make' utility, and linker.  You also
  168. need either the Borland assembler (version 1.0 or later) or the Microsoft
  169. assembler (version 4.0 or later).  Before compiling or linking, you should
  170. execute
  171.     echo !include "tc.mak" >makefile
  172. (for Turbo C and MS-DOS), or
  173.     echo !include "bc.mak" >makefile
  174. (for Turbo C++ or Borland C++ and MS-DOS), or
  175.     echo !include "bcwin.mak" >makefile
  176. (for Turbo C++ or Borland C++ and Microsoft Windows), or
  177.  
  178. Besides the source files and the makefiles, you need:
  179.     turboc.cfg (the flags and switches for Turbo C)
  180.     gs.tr (the linker commands for the interpreter)
  181.     *.bat (a variety of batch files used in the build process)
  182.  
  183. There are extensive comments in the aforementioned .mak files
  184. regarding various configuration parameters.  If your configuration is
  185. different from the following, you should definitely read those
  186. comments and see if you want or need to change any of the parameters:
  187.     - The compiler files are in c:\tc (for Turbo C) or c:\bc (for
  188. Turbo C++ or Borland C++) and its subdirectories.
  189.     - You are using the Borland assembler (tasm).
  190.     - You want an executable that will run on any PC-compatible,
  191. regardless of processor type (8088, 8086, V20, 80186, 80286, V30, 80386,
  192. 80486) and regardless of whether a math coprocessor (80x87) is present.
  193.  
  194. NOTE: Borland C++ 3.0 has two problems that affect Ghostscript (these
  195. problems are fixed in Borland C++ 3.1):
  196.  
  197.     - The assembler, tasm, often crashes when attempting to
  198. assemble gdevegaa.asm.  If this happens, try again, or use another
  199. assembler (e.g., an older version of tasm) if you have one, or set
  200. USE_ASM=0 in the makefile.
  201.  
  202.     - The math library for Microsoft Windows, mathwl.lib, has a
  203. bug that causes floating point numbers to print incorrectly.  Contact
  204. Borland for a corrected version.
  205.  
  206. If you are compiling Ghostscript with Turbo C++ 1.0, remove the
  207. `.swap' directive from bc.mak, and use the -s switch on the `make'
  208. command line.  (All later versions of the Borland environment
  209. recognize this directive.)
  210.  
  211. Note that although the Microsoft Windows version of Ghostscript will
  212. run under Windows 3.0, it uses routines from the Windows 3.1 SDK, so
  213. you need the Windows 3.1 SDK and header files to compile it.  In
  214. practice, this means that you need Borland C++ 3.1; Borland C++ 3.0
  215. doesn't include the necessary headers.
  216.  
  217. Microsoft environment
  218. ---------------------
  219.  
  220. To compile Ghostscript with the Microsoft environment, you need
  221. Microsoft C/C++ 7.0 or later with its associated `nmake' utility and
  222. linker.  Before compiling or linking, you should execute
  223.     echo !include msc.mak >makefile
  224.  
  225. Besides the source files and the makefiles, you need:
  226.     gs.tr (the linker commands for the interpreter)
  227.     *.bat (a variety of batch files used in the build process)
  228.  
  229. We have found the Microsoft `nmake' program to be very unreliable; it
  230. may crash partway through the build process with a variety of error
  231. messages, or no error message.  
  232.  
  233. We have not been able to test the Microsoft compiler in a wide
  234. variety of configurations, because it is so much slower than the
  235. Borland compiler (about 5 times) and because there is apparently no
  236. way to get it to write its error messages to a file.  If you
  237. encounter problems with the Microsoft environment, please contact
  238. Aladdin Enterprises.
  239.  
  240. Watcom environment
  241. ------------------
  242.  
  243. To avoid annoying messages from the DOS extender, add the line
  244.     set DOS4G=quiet
  245. to your autoexec.bat file. 
  246.  
  247. To compile Ghostscript with the Watcom C/386 compiler, you need to create
  248. a makefile by executing
  249.  
  250.     echo !include watc.mak >makefile
  251.  
  252. To build Ghostscript, execute
  253.  
  254.     wmake -u
  255.  
  256. ********
  257. ******** How to build Ghostscript from source (Unix version) ********
  258. ********
  259.  
  260. The makefile distributed with Ghostscript selects the following devices
  261. for inclusion in the build:
  262.     Display: X Windows driver.
  263.     File output: pbm, pbmraw, pgm, pgmraw, ppm, and ppmraw drivers.
  264.  
  265. Before compiling or linking, you should execute
  266.  
  267.     ln -s unix-cc.mak makefile
  268. or    ln -s unix-gcc.mak makefile
  269. or    ln -s unix-ansi.mak makefile
  270.  
  271. (if your Unix system doesn't support symbolic links, omit the -s switch)
  272. depending on whether your C compiler is a standard Kernighan & Ritchie C
  273. compiler, gcc being used in ANSI mode, or an ANSI C compiler other than
  274. gcc respectively.  (If you want to use gcc in non-ANSI mode, use
  275. unix-cc.mak and define the CC macro to refer to gcc.)
  276.  
  277. The unix-*.mak files are actually generated mechanically from *head.mak,
  278. *tail.mak, gs.mak, and devs.mak.  If for some reason your copy of
  279. Ghostscript doesn't include the unix-*.mak files, invoke the
  280.     tar_cat
  281. shell script to construct them.
  282.  
  283. If the X11 client header files are located in some directory which your
  284. compiler does not automatically search, you must change the XINCLUDE macro
  285. the makefile to include a specific -I switch.  See the comment preceding
  286. XINCLUDE in the makefile.
  287.  
  288. The only important customization of the X11 driver is the choice of
  289. whether or not to use a backing pixmap.  If you use a backing pixmap,
  290. Ghostscript windows will redisplay properly when they are covered and
  291. exposed, but drawing operations will go slower.  This choice is controlled
  292. by a line in the file gdevxini.c that says
  293.     private int use_backing = 1;
  294. Changing this line to read
  295.     private int use_backing = 0;
  296. will disable the use of a backing pixmap.  However, portions of the
  297. Ghostscript window may not be properly redrawn after the window is
  298. restored from an icon or exposed after being occluded by another window.
  299.  
  300. Some versions of the X server do not implement tiling properly.  This will
  301. show up as broad bands of color where dither patterns should appear.  If
  302. this happens, in the file gdevx.c, change
  303.     private int use_XSetTile = 1;
  304. to
  305.     private int use_XSetTile = 0;
  306. and recompile.  The result will run a lot slower, but the output should be
  307. correct.  If this fixes the problem, report it to whoever made your X
  308. server.
  309.  
  310. Similarly, some versions of the X server do not implement bitmap/pixmap
  311. displaying properly.  This may show up as white or black rectangles where
  312. characters should appear, or characters may appear in "inverse video"
  313. (e.g., white on a black rectangle).  If this happens, it may help you to
  314. change, in the file gdevx.c,
  315.     private int use_XPutImage = 1;
  316. to
  317.     private int use_XPutImage = 0;
  318. and recompile.  Again, there will be a serious performance penalty; again,
  319. if this fixes the problem, notify the supplier of your X server.
  320.  
  321. Currently Ghostscript is set up to compile and link in a generic Unix
  322. environment.  Some Unix environments may require changing the LDFLAGS
  323. macro in the makefile.
  324.  
  325. All you need to do to make an executable is invoke the shell command
  326.     make
  327.  
  328. Ghostscript uses ANSI syntax for function definitions. Because of this,
  329. when compiling with cc, it must preprocess each .c file to convert it to
  330. the older syntax defined in Kernighan and Ritchie, which is what most
  331. current Unix compilers (other than gcc) support.  This step is
  332. automatically performed by a utility called ansi2knr, which is included in
  333. the Ghostscript distribution.  The makefile automatically builds ansi2knr.
  334.  
  335. The ansi2knr preprocessing step is included in the makefile rule for
  336. compiling .c files.  ansi2knr creates a file called _temp_.c to hold the
  337. converted code.  If you want to change this name for some reason, it is
  338. defined in unix-cc.mak.
  339.  
  340. Platform-specific notes
  341. -----------------------
  342.  
  343. 386 Unix:
  344.     gcc versions older than 1.38 on Intel 80386 systems do not
  345. compile Ghostscript correctly using the -O option.  Do not use -O in
  346. these environments.
  347.     gcc 1.39 under 386BSD has a bug that causes float-to-integer
  348. conversions to compile incorrectly.  Do not use this version of gcc.
  349.     X11R5 may need #include <stddef.h> in x_.h.
  350.     Also see below regarding System V platforms.
  351.  
  352. Apollo:
  353.     You must run the compiler in ANSI-compatible mode (i.e., set AK=
  354. <null string> in the makefile); otherwise, it gives incorrect error
  355. messages for any function declared as returning a float value.
  356.     The Apollo compiler may not compile Ghostscript correctly.  If you
  357. get unexpected crashes at run time, use gcc.
  358.  
  359. Convex:
  360.     Use unix-ansi.mak.  Do not invoke optimization (-O1): there
  361. are compiler bugs that lead to incorrect code.  Set CFLAGS to
  362.     -fn -tm -no c1
  363.  
  364. DEC (Ultrix):
  365.     Many versions of DEC's X server (DECwindows) have bugs that
  366. require setting use_XPutImage or use_XSetTile to 0, as described above.
  367.  
  368. GNU make (any platform):
  369.     GNU make 3.59 can't handle the final linking step in some cases;
  370. use the platform's standard make (e.g., /bin/make) if this happens.
  371.  
  372. H-P 700 series:
  373.     Use the compiler flags -Aa +O3 (*not* -O).
  374.  
  375. ISC Unix:
  376.     For ISC Unix with gcc, an appropriate make invocation is:
  377.     make XCFLAGS="-D__SVR3 -posix" LDFLAGS="-shlib -posix" \
  378.          EXTRALIBS="-linet -lnsl_s"
  379. If this doesn't work for you, try removing the -shlib.  ISC Unix may
  380. also need one or more of the following in EXTRALIBS: -lpt, -lc_s.
  381. See also under "386 Unix" above.
  382.  
  383. MIPS:
  384.     There is apparently a bug in the MIPS C compiler which causes
  385. gxdither.c to compile incorrectly if optimization is enabled (-O).  Until
  386. a work-around is found, do not use -O with the MIPS C compiler.
  387.  
  388. NeXT:
  389.     Use unix-gcc.mak, but change the name of the compiler (CC=)
  390. from gcc to cc.  Also, include -D_NEXT_SOURCE in CFLAGS, and change
  391. the two occurrences of sys/time.h to ansi/time.h.  You may also find
  392. it useful to add the following line to Fontmap:
  393.         /Ohlfs    /Courier    ;
  394.  
  395. RS/6000:
  396.     Due to compiler bugs, most of the obvious ways to compile
  397. Ghostscript on the RS/6000 don't work.  You should use the following
  398. command line, or a similar one with a different compiler (see below):
  399.  
  400.     make -f unix-ansi.mak CC=c89 \
  401.     XINCLUDE=-I/usr/misc/X11/include XLIBDIRS=-L/usr/misc/X11/lib
  402.  
  403. You must also edit the makefile (unix-ansi.mak or unix-cc.mak) to define
  404. CFLAGS as -DSYSV -D_POSIX_SOURCE, and to change INSTALL to
  405. /usr/ucb/install.  (If -DSYSV produces a complaint about the functions
  406. index and rindex not being defined, try removing it.)
  407.  
  408. Even beyond all this, many people have trouble with Ghostscript on
  409. the RS/6000.  The usual symptom is that it compiles and links OK, but
  410. produces garbaged output on the screen.  The problem may be related
  411. to particular versions of AIX or the X server; we don't have enough
  412. information at this time.  The following combinations of AIX and X
  413. are known to fail:
  414.     AIX 3.1.5, MIT X11R4, c89, unix-ansi.mak
  415.     AIX 3.2.0 or 3.2.1, c89 or xlc
  416. The following combinations are known to work:
  417.     AIX 3.1.5, MIT X11R5, c89, unix-ansi.mak
  418.     AIX 3.2, MIT X11R5, xlc 1.2.0.9, unix-ansi.mak
  419.     AIX 3.2, c89, unix-ansi.mak -- but you must compile
  420.       without optimization (no -O)
  421.     AIX 3.2.0 or 3.2.1, cc, unix-cc.mak, no -O
  422. It may be that just including -Dconst= in the command line is
  423. sufficient to get around the bugs in the AIX 3.1.5 compiler.
  424.  
  425. Apparently some (but not all) releases of the C library declare the hypot
  426. function: if the declaration in math_.h produces an error message, try
  427. removing it.  Also, the IBM X11R3 server is known to be buggy: use the MIT
  428. X server if possible.
  429.  
  430. SCO Unix/Xenix:
  431.     The SCO Unix C compiler apparently can't handle the Pn macros
  432. in std.h.  If you get strange compilation errors on SCO Unix, see if
  433. you can get a compiler fix from SCO.  Meanwhile, to use gcc with SCO
  434. ODT, see gcc-head.mak for the appropriate switch settings.  See also
  435. under "386 Unix" above.
  436.     gcc 2.3.3 produces code that causes a core dump on machines
  437. that don't have hardware floating point, because of a bug in SCO's
  438. floating point emulator.  Use a different compiler on these machines.
  439.     If you aren't using the X11 driver, you need to add -lsocket
  440. to the linker command (near the end of the unix-*.mak file) in order
  441. to get the date/time functions linked in.
  442.     If you want to use direct frame buffer addressing instead of
  443. X Windows, include the relevant frame buffer device(s) (ega.dev,
  444. vga.dev, etc.) and change gdevevga.c to gdevsco.c as indicated in
  445. devs.mak.  Note: this does not work with SuperVGA displays, except
  446. for 800x600x16 mode.
  447.     If your compiler accepts the -Xt and -Xa switches, use -Xt.
  448. Even though this causes the compiler to use incorrect rules for
  449. computing the result types of << and >>, -Xa enables "optimizations"
  450. that produce incorrect code.
  451.     For SCO ODT 2.0, in addition to -D__SVR3 and -DSYSV, you need to
  452. specify -Dsco, -DUSG, and -DMALLOC_0_RETURNS_NULL.  For SCO ODT, you need
  453. EXTRALIBS=-lX11 -lsocket -lmalloc, or maybe only -lsocket (depending on
  454. the version), and for SCO ODT 2.0, you also need to specify -lc_s.  For
  455. SCO Xenix, you need EXTRALIBS=-lmalloc.
  456.     For all SCO systems, set XINCLUDE= and XLIBDIRS=.
  457.  
  458. Sun:
  459.     The Sun unbundled C compiler (SC1.0) doesn't compile Ghostscript
  460. properly if the -fast option is selected: Ghostscript core-dumps in
  461. build_gs_font.  Use -g, or use gcc.
  462.     The Sun version of dbx often gives up with an error message when
  463. trying to load Ghostscript.  If this happens, use gdb instead.  (gdb is
  464. more reliable than dbx in other ways as well.)
  465.     Solaris 2.2 may require setting EXTRALIBS=-lsocket.
  466.     In SunOS 4.1.[23], you may get these undefined symbols when linking:
  467.         _get_wmShellWidgetClass
  468.         _get_applicationShellWidgetClass
  469. Compiling "-Bstatic -lXmu -Bdynamic" appears to work.  To solve the
  470. problem if you are using OpenWindows 3.0 (X11R4-based Xt), please contact
  471. your local Sun office and request the following patches:
  472.     Patch i.d.      Description
  473.     100512-02       4.1.x OpenWindows 3.0 libXt Jumbo patch
  474.     100573-03       4.1.x OpenWindows 3.0 undefined symbols when using
  475.                 shared libXmu
  476. A source patch for use with the MIT X11R4 libraries was developed by Conrad 
  477. Kimball (cek@sdc.boeing.com); it retrofits into R4 some fixes made in R5 to
  478. get around this problem. The patch is on export in [1/93]
  479.         contrib/X11R4_sunos4.1.2_patch_version3.Z
  480.  
  481. System V Unix platforms:
  482.     If you are using a stock System V platform that lacks rename
  483. and gettimeofday, change PLATFORM=unix_ in the makefile to
  484. PLATFORM=sysv_.
  485.     You will probably need to change the definition of INSTALL (near
  486. the beginning of the makefile) from install to /usr/ucb/install.
  487.  
  488. ********
  489. ******** How to build Ghostscript from source (VAX/VMS version) ********
  490. ********
  491.  
  492. The files VMS-CC.MAK and VMS-GCC.MAK are VMS DCL command files which
  493. build Ghostscript from scratch using either the DEC C compiler, CC, or
  494. the Free Software Foundation's GNU C compiler, GCC.  Accordingly, you
  495. must have one of these two compilers installed in order to build
  496. Ghostscript.  (Other C compilers may work: CC and GCC are the only two
  497. compilers tested to date.)  These two command files build and store
  498. the Ghostscript library in the object library GS.OLB.  If you have
  499. DECwindows (X11) installed on your system, the executable images GS.EXE,
  500. GT.EXE, and XLIB.EXE will also be built.
  501.  
  502. Some environments use the DWTLIBSHR library for providing the X
  503. Windows intrinsics, and some use the XTSHR library.  XTSHR is newer,
  504. and is part of the DECwindows/Motif product.  However, DEC is still
  505. distributing versions of VMS with DWTLIBSHR.  If your environment
  506. uses XTSHR, replace DWTLIBSHR in the list of link libraries with
  507. XTSHR.
  508.  
  509. The only important customization of the X11 driver is the choice of
  510. whether or not to use a backing pixmap.  If you use a backing pixmap,
  511. Ghostscript windows will redisplay properly when they are covered and
  512. exposed, but drawing operations will go slower.  This choice is controlled
  513. by the line in the file gdevx.c that reads
  514.     private int use_backing = 1;
  515. Changing this line to read
  516.     private int use_backing = 0;
  517. will disable the use of a backing pixmap.  However, portions of the
  518. Ghostscript window may not be properly redrawn after the window is
  519. restored from an icon or exposed after being occluded by another window.
  520.  
  521. Many versions of DEC's X server (DECwindows) have bugs that require
  522. setting use_XPutImage or use_XSetTile to 0, as described above.  These
  523. show up as broad bands of color where dither patterns should appear, or
  524. characters displayed white on top of black rectangles or not displayed at
  525. all.  If this happens, change use_XSetTile or use_XPutImage to 0 as
  526. described above.  The result will run a lot slower, but the output will be
  527. correct.  Report the problem to DEC, or whoever supplied your X server.
  528.  
  529. Ghostscript uses ANSI syntax for function definitions. Thus, when using
  530. the DEC C compiler, each .C file is converted to the older C syntax defined
  531. in the first edition of Kernighan and Ritchie and stored in a .CC file.
  532. This step is performed by VMS-CC.MAK using the ansi2knr utility included
  533. in the Ghostscript distribution.  If you are building a debuggable
  534. configuration, the .CC files will be left behind by VMS-CC.MAK for use by
  535. the VMS Debugger; otherwise, they will be deleted.
  536.  
  537. If you have DEC's C compiler, issue the DCL command
  538.         $ @VMS-CC.MAK
  539. to build Ghostscript.  If you have GNU C, issue the DCL command
  540.         $ @VMS-GCC.MAK
  541. to build Ghostscript.
  542.  
  543. The option "DEBUG" may be specified with either command file in order to
  544. build a debuggable Ghostscript configuration:
  545.         $ @VMS-CC.MAK DEBUG    -or-   $ @VMS-GCC.MAK DEBUG
  546.  
  547. In order to specify switches and file names when invoking the interpreter,
  548. define GS as a foreign command:
  549.         $ GS == "$disk:[directory]GS.EXE"
  550. where "disk" and "directory" specify the disk and directory where Ghostscript
  551. is located.  For instance,
  552.         $ GS == "$DUA1:[GHOSTSCRIPT]GS.EXE"
  553. To allow the interpreter to be run from any directory, define the logical
  554. GS_LIB which points to the Ghostscript directory
  555.         $ DEFINE GS_LIB disk:[directory]
  556. This allows Ghostscript to locate its initialization files stored in the
  557. Ghostscript directory -- see use.doc for further details.  Finally, to
  558. invoke the interpreter, merely type GS.  Although DCL normally converts
  559. unquoted parameters to upper case, C programs receive their parameters in
  560. lower case.  That is, the command
  561.         $ GS -Isys$login:
  562. passes the switch "-isys$login" to the interpreter.  To preserve the
  563. case of switches, enclose them in double quotes; e.g.,
  564.         $ GS "-Isys$login:"
  565.  
  566. If you add compiled fonts to your system as described in the fonts.doc
  567. file, you must C-compile them in an environment that includes some
  568. definitions from vms-cc.mak.  Find the section of vms-cc.mak with the
  569. comment "Give ourself a healthy search list for C include files" and
  570. execute the immediately following DEFINE commands before C-compiling the
  571. fonts.
  572.  
  573. ********
  574. ******** A guide to the files ********
  575. ********
  576.  
  577. General
  578. -------
  579.  
  580. There are very few machine dependencies in Ghostscript.  A few of the .c
  581. files are machine-specific.  These have names of the form
  582.     gp_<platform>.c
  583. specifically
  584.     gp_dosfb.c (all MS-DOS platforms)
  585.     gp_msdos.c (all MS-DOS platforms)
  586.     gp_itbc.c (MS-DOS, Borland compilers)
  587.     gp_iwatc.c (MS-DOS, Watcom or Microsoft compiler)
  588.     gp_unix.c (all Unix)
  589.     gp_sysv.c (System V Unix)
  590.     gp_vms.c (VMS)
  591. There are also some machine-specific conditionals in files with names
  592. <something>_.h.  If you are going to extend Ghostscript to new
  593. machines or operating systems, you should check the *_.h files for
  594. ifdef's on things other than DEBUG, and you should probably count on
  595. making a new makefile and a new gp_ file.
  596.  
  597. Library
  598. -------
  599.  
  600. Files beginning with gs, gx, or gz (both .c and .h), other than gs.c
  601. and gsmain.c, are the Ghostscript library.  Files beginning with gdev
  602. are device drivers or related code, also part of the library.  Other
  603. files beginning with g are library files that don't fall neatly into
  604. either the kernel or the driver category.
  605.  
  606. Interpreter
  607. -----------
  608.  
  609. gs.c is the main program for the language interpreter.
  610.  
  611. Files beginning with z are Ghostscript operator files.  The names of the
  612. files generally follow the section headings of the operator summary in
  613. section 6.2 of the PostScript manual.
  614.  
  615. .c files beginning with i, and .h files not beginning with g, are the
  616. rest of the interpreter.  See the makefile for a little more information
  617. on how the files are divided functionally.
  618.  
  619. There are a few files that are logically part of the interpreter, but that
  620. are potentially useful outside Ghostscript, whose names don't begin with
  621. either g, z, or i:
  622.  
  623.     s*.c (a flexible stream package, including the Level 2 PostScript
  624. 'filters' supported by Ghostscript);
  625.